package com.example.dog.biz.controller.api;


import com.baomidou.mybatisplus.extension.api.R;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.LinkedHashMap;
import java.util.Map;

@Controller
@Api("客服接口")
public class Demo1Controller {
    @ApiOperation(value="获取客服", notes="根据cid获取客服")
    @ApiImplicitParam(name = "cid", value = "客户id", required = true, dataType = "String")
    @ResponseBody
    @GetMapping("/getCenter")
    public R<Map> getCenter(String cid) {
        Map<String,String> map=new LinkedHashMap<String,String>();
        map.put("cid",cid);
        map.put("name","客服");
        return R.ok(map);
    }

    @ApiOperation(value="获取客服", notes="根据cid获取客服")
    @ApiImplicitParam(name = "cid", value = "客户id", required = true, dataType = "String")
    @ResponseBody
    @PostMapping("/getCenter/{cid}")
    public R<Map> getCenter2(@PathVariable String cid) {
        Map<String,String> map=new LinkedHashMap<String,String>();
        map.put("cid",cid);
        map.put("name","客服");
        return R.ok(map);
    }
}
